<?php $this->load->module('mobile/index/header', $common);?>
<link rel="stylesheet" type="text/css" href="<?php echo URLPRE;?>static/template/default/mobile/css/main.css" />
<link rel="stylesheet" type="text/css" href="<?php echo URLPRE;?>static/template/default/mobile/css/dialog.css" />
<link rel="stylesheet" type="text/css" href="<?php echo URLPRE;?>static/template/default/mobile/css/base.css" />
<link rel="stylesheet" type="text/css" href="<?php echo URLPRE;?>static/template/default/mobile/css/index.css" />
<link rel="stylesheet" type="text/css" href="<?php echo URLPRE;?>static/template/default/mobile/css/line.css" />
<script type="text/javascript" src="<?php echo URLPRE;?>static/template/default/mobile/js/mobilecommon.js"></script>
<script type="text/javascript" src="<?php echo URLPRE;?>static/template/default/mobile/js/slider.js"></script>
<script type="text/javascript" src="<?php echo URLPRE;?>static/template/default/mobile/js/dialog.js"></script>
<style>
     html,body{height:100% !important;}
     input::-webkit-input-placeholder{color:#FFF;}


</style>
<div class="login-content">
    <div class="login-img">
                <img src="<?php echo URLPRE;?>static/template/weixin/mobile/img/login.png">
    </div>

    <form action="" class="login-form-wrap" method="post">
        <input name="referer" value="<?php echo !empty($_GET['referer']) ? $_GET['referer'] : '';?>" type="hidden">
        <article class="login-input-box">
            <section>
                 <input name="Form[account]" placeholder="请输入手机号或注册号" autocomplete="off"  type="text"  class="login-input" >
            </section>
            <section>
                 <input name="Form[password]" placeholder="请输入登录密码"  autocomplete="off" type="password"   class="login-input">
            </section>
        </article>
        <div class="login-button-box">
            <a href="javascript:void(0);" class="login-button" id="js-login-button" title="登录">登 录</a>
        </div>
        <div class="login-menu clear">
            <a class="fl" href="<?php echo site_url('mobile/member/register');?>">免费注册</a>
            <a class="fr" href="<?php echo site_url('mobile/member/forgot');?>">忘记密码?</a>
        </div>
    </form>
</div>

<?php $this->load->module('mobile/index/footer', $common);?>
<script type="text/javascript">
  function alert_popup(text){
      $.dialog({
          style:'tip',
          width:200,
          closeTime:1000,
          content: '<p style="text-align: center">'+text+'</p>'
      }).open();
  }

$(function(){

    $('#js-login-button').click(function(){
        if($('input[name="Form[account]"]').val().length == 0){
            alert_popup('请输入手机号码');
            return false;
        }
        if($('input[name="Form[password]"]').val().length == 0){
            alert_popup('请输入密码');
            return false;
        }
        var account = $('input[name="Form[account]"]').val();
        var password = $('input[name="Form[password]"]').val();
        $.post('<?php echo $form_url ;?>',{
            account: account,
            password: password
            },function(data){
                  if(data.status=='1')
                  {
                      var history = $('input[name="referer"]').val();
                      if(history.length==0) {
                          
                          window.location.href = basemobileurl ;
                      }else{
                          window.location.href = baseurl+''+history ;
                      }

                  }
                  alert_popup(data.info);
            return false;
        },'json')
    })
});
</script>